package com.sunhealth.java.ai.langchain4j.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

@AiService(
        wiringMode = EXPLICIT,
//    chatMemory = "chatMemory",
        chatModel = "qwenChatModel",
        chatMemoryProvider = "chatMemoryProvider"
        , tools = "calculatorTools" //配置tools

)
public interface SeparateChatAssistant {

    /**
     * 分离聊天记录
     *
     * @param memoryId    聊天id
     * @param userMessage 用户消息
     * @return
     */
    @SystemMessage(fromResource = "my-prompt-template.txt")
//    @SystemMessage("你是我的好朋友，请用河南话回答问题。今天是{{current_date}}")//系统消息提示词
    String chat(@MemoryId int memoryId, @UserMessage String userMessage);
}